/************************************Kml解析入数据库*********************************************/


//加载
VFGEditor.prototype.kmlForLoad = function (id,url) {
	var _this=this;
    layer.load(2);
    _this.viewer.dataSources.add(Cesium.KmlDataSource.load(url, {
        camera : _this.viewer.scene.camera,
        canvas : _this.viewer.scene.canvas,
        clampToGround: true //开启贴地
    })).then(function(dataSource){
        var entities = dataSource.entities.values;
        for(var i=0;i<entities.length;i++){
        	var entity=entities[i];
        	if(entity.polygon){
        		
        	}
        	else if(entity.point){
        		
        	}
        	else if(entity.polyline){
        		
        	}
        	else if(entity.label){
        		
        	}
        	else if(entity.point){
        		
        	}
        	else if(entity.point){
        		
        	}
        }
    	
    });
    
    
    
    var formData={}; 
    formData['bizLine.id']=id;
    formData['bizLine.name']='线';
    formData['bizLine.points']=JSON.stringify(positions);
	var layerId=this.getImgLayerTreeIdForPoint();
    formData['bizLine.layerId']=layerId?layerId:'root';
    formData['bizLine.sceneId']=this.sceneId;
    var res = common_ajax.ajaxFunc(ctx+"/biz/marker/line/save",formData, "json", null);
    layer.closeAll('loading');
    if (res!=undefined && 200==res.code) {
    	var polyLineRender=res.data;
    	if(polyLineRender){
    		var line=polyLineRender.line;
    		if(line){
    			this.addImgLayerTreeNode(line,'line');
    		}
    	}
    }
};

